#!/usr/bin/env python
import sys
from datetime import datetime, timedelta
try:
    gday_orig = sys.argv[1]
    add_days = sys.argv[2]

    year = int(gday_orig[0:4])
    month = int(gday_orig[4:6])
    day = int(gday_orig[6:8])

    days = int(add_days)

    date_result = datetime(year, month, day) + timedelta(days=days)

    print date_result.strftime("%Y%m%d")
except:
    print "Usage: gday_change gday_orig  add_days"
    sys.exit(1)

sys.exit(0)
